package com.jessechanrui.template.skeleton.common.constant;

/**
 * 业务状态码
 * @author chenrui
 * @date 2024/1/29
 */
public enum BusinessStatusCode implements IStatusCode {
    SUCCESS(200, "操作成功"),
    INTERNAL_FAIL(500, "系统异常"),
    // 更多异常……
    OPERATE_FAIL(500, "操作异常"),
    ;

    /**
     * 系统异常码
     */
    private Integer code;
    /**
     * 异常信息
     */
    private String message;

    BusinessStatusCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }


    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
